package 数据结构和算法.算法.查找算法.顺序查找;

public class Test {
    public static void main(String[] args) {
        int[] array = {2, 1, 4, 5, 5, 6};
        System.out.printf(String.valueOf(search(array, 7)));
    }

    public static boolean search(int[] array, int key) {
        for (int i : array) {
            if (key == i) {
                return true;
            }
        }
        return false;
    }
}
